package hprose.tcphelloexam;

import hprose.client.HproseTcpClient;
import hprose.common.HproseCallback1;

import java.io.IOException;
import java.net.URISyntaxException;

public class TCPHelloClient2 {
    
    public static void main(String[] args) throws IOException, URISyntaxException {
    	HproseTcpClient client = new HproseTcpClient("tcp://localhost:4321");
    	client.invoke("hello", new Object[] {"Async World"},  new HproseCallback1<String>(){
            public void handler(String result) {
                System.out.println(result);
            }
    	});
    	System.out.println("OK");
        System.out.println(client.invoke("hello", new Object[] {"World"}, String.class));
        client.close();
    }
}
